package com.yawn;

import org.activiti.engine.IdentityService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.identity.Group;

/**
 * @author Created by yawn on 2017-12-09 13:33
 */
public class SaveGroup {

    public static void main(String[] args) {
        ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();
        IdentityService identityService = engine.getIdentityService();
        for (int i = 0; i < 10; i++) {
            Group group = identityService.newGroup(String.valueOf(i));
            group.setName("Group_" + i);
            group.setType("Type_" + i);
            identityService.saveGroup(group);
        }
        engine.close();
    }
}
